package com.trg.generaltool.service.rabbitmq.conform.workqueue;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ClassName: Provider
 * @Description:    work模型-生产者
 * @Author: tangrg
 * @Date: 2021/7/19 16:09
 * @Version: 1.0
 * @Return:
 **/
@Component
public class ProviderWork {
    @Autowired
    RabbitTemplate rabbitTemplate;

    public void sendMsg(){
        for (int i = 0; i < 10; i++) {
            rabbitTemplate.convertAndSend("work",i+"Work  模型");
        }
    }
}
